package com.example.extension.biz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.extension.biz.bo.NotifyVerifyAmtUpdatedBO;
import com.example.extension.framework.ExtensionExecutor;

@Service
public class Client {
    @Autowired
    private ExtensionExecutor executor;
    
    public void invoke(NotifyVerifyAmtUpdatedBO bo) {
        executor.executeVoid(
            NotifyVerifyAmtUpdatedBiz.class, // 接口
            bo.getTtCode(), // 选择实现类需要的场景编号
            t -> t.notifyVerifyAmtUpdated(bo)); // 调用实现类的方法
    }
    
    public void invokeByTenant(NotifyVerifyAmtUpdatedBO bo, String tenantCode) {
        executor.executeVoidByTenantCode(
            NotifyVerifyAmtUpdatedBiz.class, // 接口
            tenantCode, // 租户编号
            t -> t.notifyVerifyAmtUpdated(bo)); // 调用实现类的方法
    }
    
}
